#pragma once
#include "stdafx.h"
#include "PGLLineContainer.h"

CPGLLine2DPtr CPGLLineContainer::operator ->()
{
	return m_line;
}
CPGLLine2DPtr CPGLLineContainer::operator [](int index)
{
	if(index<m_points.size())
		return m_points[index];
	return CPGLLine2DPtr();
}
void CPGLLineContainer::AddPoint(CPGLLine2DPtr point)
{
	std::vector<CPGLLine2DPtr>::const_iterator it=find(m_points.begin(),m_points.end(),point);
	if(it==m_points.end())
	{
		m_points.push_back(point);
	}
}
void CPGLLineContainer::SetLine(CPGLLine2DPtr line)
{
	m_line=line;
}